package com.wut.core.common.enums;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResponseMessageEnum {

    GET("GET", "查询"),
    POST("POST", "新增"),
    PUT("PUT", "更新"),
    DELETE("DELETE", "删除");

    private final String respMethod;
    private final String respMessage;

    public static String getRespMessage(String respMethod) {
        for (ResponseMessageEnum responseMessageEnum : ResponseMessageEnum.values()) {
            if (responseMessageEnum.getRespMethod().equalsIgnoreCase(respMethod)) {
                return responseMessageEnum.getRespMessage();
            }
        }
        return StrUtil.EMPTY;
    }
}
